package com.hyt.it.ogt.ykcj.mapper.grade;


import com.hyt.it.ogt.ykcj.domain.grade.EnterpriseExamineeSubjectGrade;
import com.hyt.it.ogt.ykcj.domain.vo.EnterpriseExamineeExamGradeVo;
import com.hyt.it.ogt.ykcj.domain.vo.EnterpriseExamineeSubjectGradeVo;
import com.hyt.it.ogt.ykcj.domain.vo.ExamScoreVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * 企业招聘考生科目成绩Mapper接口
 * 
 * @author liying
 * @date 2021-01-18
 */
public interface EnterpriseExamineeSubjectGradeMapper
{
    /**
     * 查询企业招聘考生科目成绩
     *
     * @param id 企业招聘考生科目成绩ID
     * @return 企业招聘考生科目成绩
     */
    EnterpriseExamineeSubjectGrade selectEnterpriseExamineeSubjectGradeById(String id);

    /**
     * 查询企业招聘考生科目成绩列表
     *
     * @param enterpriseExamineeSubjectGrade 企业招聘考生科目成绩
     * @return 企业招聘考生科目成绩集合
     */
    List<EnterpriseExamineeSubjectGrade> selectEnterpriseExamineeSubjectGradeList(EnterpriseExamineeSubjectGrade enterpriseExamineeSubjectGrade);

    /**
     * 新增企业招聘考生科目成绩
     *
     * @param enterpriseExamineeSubjectGrade 企业招聘考生科目成绩
     * @return 结果
     */
    int insertEnterpriseExamineeSubjectGrade(EnterpriseExamineeSubjectGrade enterpriseExamineeSubjectGrade);

    /**
     * 修改企业招聘考生科目成绩
     *
     * @param enterpriseExamineeSubjectGrade 企业招聘考生科目成绩
     * @return 结果
     */
    int updateEnterpriseExamineeSubjectGrade(EnterpriseExamineeSubjectGrade enterpriseExamineeSubjectGrade);

    /**
     * 删除企业招聘考生科目成绩
     *
     * @param id 企业招聘考生科目成绩ID
     * @return 结果
     */
    int deleteEnterpriseExamineeSubjectGradeById(String id);

    /**
     * 批量删除企业招聘考生科目成绩
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteEnterpriseExamineeSubjectGradeByIds(String[] ids);


    /**
     * 批量删除企业招聘考生科目成绩
     *
     * @param examineeIds,examId 需要删除的数据ID
     * @return 结果
     */
    int deleteEnterpriseExamineeSubjectGradeByExamineeIds(@Param("examineeIds")String[]  examineeIds,@Param("examId")String examId,@Param("subjectId")String subjectId);


    /**
     * 企业招聘考生科目成绩
     * @param examId
     * @param subjectId
     * @return
     */
    int deleteEnterpriseExamineeSubjectGradeByExamId(@Param("examId")String examId,@Param("subjectId")String subjectId);



    /**
     * 企业招聘考生科目成绩
     * @param examIds
     * @return
     */
    int deleteEnterpriseExamineeSubjectGradeByExamIds(@Param("examIds")String [] examIds);


    /**
     * 新增批量企业招聘考生科目成绩
     * @param list 企业招聘考生科目成绩
     * @return 结果
     */
    Integer insertBatchEnterpriseExamineeSubjectGrade(List<EnterpriseExamineeSubjectGrade> list);

    /**
     * 新增批量企业招聘考生科目成绩(自选科目)
     * @param list 企业招聘考生科目成绩
     * @return 结果
     */
    Integer insertBatchEnterpriseExamineeSubjectGradeMerge(List<EnterpriseExamineeSubjectGrade> list);

    /**
     * 更新批量企业招聘考生科目成绩
     * @param list 企业招聘考生科目成绩
     * @return 结果
     */
    Integer updateBatchEnterpriseExamineeSubjectGrade(List<EnterpriseExamineeSubjectGrade> list);


    /**
     * 根据考生查询科目信息成绩
     * @param examineeIds
     * @param examId
     * @return
     */
    List<EnterpriseExamineeSubjectGradeVo> selectEnterpriseExamineeSubjectByExamineeIds(@Param("examineeIds")String[]  examineeIds,@Param("examId")String examId);


    /**
     * 根据考生查询考试信息成绩
     * @param parms
     * @return
     */
    List<EnterpriseExamineeExamGradeVo> selectEnterpriseExamineeByParms(Map<String,Object> parms);


    /**
     * 根据考生查询科目信息成绩
     * @param parms
     * @return
     */
    List<EnterpriseExamineeExamGradeVo> selectEnterpriseSubjectExamineeByParms(Map<String,Object> parms);

    /**
     * 根据考生查询科目信息成绩
     * @param parms
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectEnterpriseSubjectExamineeByParms2(Map<String,Object> parms);

    /**
     * 根据考生查询合并科目考试信息成绩
     * @param parms
     * @return
     */
     List<EnterpriseExamineeExamGradeVo> selectSubjectEnterpriseExamineeByParms(Map<String,Object> parms);

    /**
     * 根据考生查询合并科目考试信息成绩
     * @param examIds
     * @return
     */
    List<EnterpriseExamineeExamGradeVo> selectSubjectEnterpriseExamineeByExamIds(@Param("examIds")String[]  examIds);

    /**
     * 根据考生查询题目信息成绩
     * @param examineeIds
     * @param examId
     * @return
     */
    List<EnterpriseExamineeSubjectGradeVo> selectEnterpriseExamineeStemByExamineeIds(@Param("examineeIds")String[]  examineeIds,@Param("examId")String examId);


    /**
     * 更新企业招聘考生归档状态（多ID操作）
     * @param archivedStatus 归档状态
     * @param archivedDate 归档时间
     * @param examineeIds 考生ID
     * @return 结果
     */
    Integer updateArchiveByIds(@Param("archivedStatus") String archivedStatus, @Param("archivedDate") Date archivedDate, @Param("examId") String examId, @Param("subjectId") String subjectId,@Param("examineeIds") String[] examineeIds);


    /**
     * 更新企业招聘考生归档状态（考试ID操作）
     * @param archivedStatus
     * @param archivedDate
     * @param examId
     * @param subjectId
     * @return
     */
    Integer updateArchiveByExamId(@Param("archivedStatus") String archivedStatus, @Param("archivedDate") Date archivedDate, @Param("examId") String examId, @Param("subjectId") String subjectId );

    /**
     * 根据考试id，考生id删除考生的考试成绩
     * @param examId
     * @param examineeId
     * @return
     */
    int deleteBatchByExamIdAndExamineeId(@Param("examId")String examId,@Param("examineeId")String examineeId);


    /**
     * 根据考试id查询考试是否有成绩数据
     * @param examId
     * @return
     */
    int countByExamId(String examId);



    /**
     * 更新企业招聘考生合格状态（多ID操作）
     * @param qualifiedStatus 合格状态 Y-合格，N-未合格
     * @param ids 科目ids
     * @return 结果
     */
    Integer updateQualifiedStatusByIds(@Param("qualifiedStatus") String qualifiedStatus,  @Param("ids") String[] ids);

    /**
     * 更新企业招聘考生取件名称（多ID操作）
     * @param regionName 区间名称
     * @param ids 科目ids
     * @return 结果
     */
    Integer updateRegionnameByIds(@Param("regionName") String regionName,  @Param("ids") String[] ids);


    /**
     * 根据考生查询题目信息成绩
     * @param examineeId
     * @param examId
     * @return
     */
    List<EnterpriseExamineeSubjectGradeVo> selectExamineeSubjectGradeByExamineeId(@Param("examineeId")String  examineeId,@Param("examId")String examId);


    /**
     * 查询企业招聘考生信息成绩
     *
     * @param examIds 考试id
     * @return 企业招聘考生信息集合
     */
    List<EnterpriseExamineeSubjectGradeVo> selectExamineeSubjectGradeByExamIds(@Param("examIds")String[]  examIds);



    /**
     * 根据考试查询归档考生信息成绩数
     *
     * @param examIds
     * @return
     */
    Integer countArchivedExamineeSubjectGrade(@Param("examIds") String[] examIds,@Param("examineeIds") String[] examineeIds);

    /**
     * 根据考试查询归档考生信息成绩数
     *
     * @param examId
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectArchivedExamineeSubjectGradeBySubjecIds(@Param("examId")String examId, @Param("subjectIds") String[] subjectIds);


    /**
     * 根据考试查询归档考生数
     *
     * @param examId
     * @return
     */
    Integer countArchivedExamineeSubject(@Param("examId") String examId);


    /**
     * 查询企业招聘考生科目成绩列表
     * @param examineeIds
     * @param examId
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectArchiveEnterpriseExamineeSubjectGradeList(@Param("examineeIds")String[]  examineeIds,@Param("examId")String examId,@Param("archivedStatus")String archivedStatus);


    /**
     * 查询企业招聘考生科目成绩列表
     * @param examineeIds
     * @param examIds
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectExamineeSubjectGradeListByExamineeIds(@Param("examineeIds")String[]  examineeIds,@Param("examIds")String[] examIds,@Param("archivedStatus")String archivedStatus);

    /**
     * 获取科目列表成绩
     * @param enterpriseExamineeSubjectGrade
     * @return
     */
    List<EnterpriseExamineeSubjectGradeVo> selectExamineeSubjectGradeList(EnterpriseExamineeSubjectGradeVo enterpriseExamineeSubjectGrade);


    /**
     * 获取考试最大成绩得分
     * @param examIds
     * @return
     */
    List<ExamScoreVo> getExamineeMaxScore(@Param("examIds")String[]  examIds);

    /**
     * 获取考试最小成绩得分
     * @param examIds
     * @return
     */
    List<ExamScoreVo> getExamineeMinScore(@Param("examIds")String[]  examIds);

    /**
     * 根据考试id和科目id查询所有成绩信息
     * @param subjectIds
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectGradeByExamIdAndSubjectIds(@Param("subjectIds")List<String> subjectIds);

    /**
     * 根据考试id和科目id查询所有成绩信息
     * @param subjectId
     * @return
     */
    List<EnterpriseExamineeSubjectGrade> selectGradeByExamIdAndSubjectId(@Param("subjectId")String subjectId);



    /**
     * 查询企业招聘考生分析信息
     *
     * @param examIds 考试id
     * @return 查询企业招聘考生分析信息
     */
    List<EnterpriseExamineeSubjectGradeVo> selectExamineeSubjectGradeAnalysisByExamIds(@Param("examIds")String[]  examIds);
}
